*Purpose: This dataset corrects the endline teacher monitoring survey for variable names
*		  , labels, inconsistencies, etc

clear all
set more off

use "[directory]/teacher_monitoring_endline_preclean.dta",clear

*Section 1. School and Teacher identification 
*************************************************
rename ubl_priv_108 publ_priv_108

*typeactivity_300
la var typeactivity_300 "300_What type of activities did you observe in classroom?"
notes replace typeactivity_300 in 1: "300_What type of activities did you observe in classroom?"


*observations_300
la var observations_300 "300_During the observed class period, did you observe any of the following activities (Please check all that apply)"
notes replace observations_300 in 1: "300_During the observed class period, did you observe any of the following activities (Please check all that apply)"

rename (observations_300_1 observations_300_2 observations_300_3 observations_300_4 observations_300_5 observations_300_6 observations_300_7 observations_300_8 observations_300_9 observations_300__66)(observations_300_IntLearnAct observations_300_SmallGroup observations_300_IndepWork observations_300_WorkPresent observations_300_UseBooks observations_300_PortfolioWork observations_300_StudOutside observations_300_CopyNotebooks observations_300_Feedback observations_300_Other)
rename observations_300_o observations_300_Otherspecify

foreach var in observations_300_IntLearnAct observations_300_SmallGroup observations_300_IndepWork observations_300_WorkPresent observations_300_UseBooks observations_300_PortfolioWork observations_300_StudOutside observations_300_CopyNotebooks observations_300_Feedback observations_300_Other observations_300_Otherspecify{
la var `var' "300_During the observed class period, did you observe any of the following activities (Please check all that apply)"
notes replace `var' in 1: "300_During the observed class period, did you observe any of the following activities (Please check all that apply)"
}

foreach var in observations_300_IntLearnAct observations_300_SmallGroup observations_300_IndepWork observations_300_WorkPresent observations_300_UseBooks observations_300_PortfolioWork observations_300_StudOutside observations_300_CopyNotebooks observations_300_Feedback observations_300_Other{
la val `var' yesnolbl
}

*portfolio_301
rename portfolio_301 teacher_assignw_300x 
la var teacher_assignw_300x "Did the teacher assign work to be included in students’ portfolio or assign a portfolio assignment?"
la def teacher_assignw_300x 1 "No" 2 "Yes, they mentioned it verbally" 3 "Yes, they wrote it on the board" 4 "Other"
la val teacher_assignw_300x teacher_assignw_300x
notes replace teacher_assignw_300x in 1: "Did the teacher assign work to be included in students’ portfolio or assign a portfolio assignment?"

*display_302
rename display_302 displaystudentwork_300x1
la var displaystudentwork_300x1 "Did the teacher display any student work around the classroom?"
la def displaystudentwork_300x1 0 "No" 1 "Yes, but no evidence provided" ///
	3 "Yes, entrepreneurship-related work displayed on board or other visible area"
la val displaystudentwork_300x1 displaystudentwork_300x1
notes replace displaystudentwork_300x1 in 1: "Did the teacher display any student work around the classroom?"

*class_phyc_303 // renamed as it was added at endline
rename class_phyc_303 class_phyc_303_e

*learning_aid_304
la var learning_aid_304_specify_other "304. What learning aids did teachers use or refer to during the class"
rename learning_aid_304 learning_aid_304_e
rename (learning_aid_304_other learning_aid_304_specify_other)(learning_aid_304_e_other learning_aid_304_e_specify_other)
rename (learning_aid_304_1 learning_aid_304_2 learning_aid_304_3 learning_aid_304_4 learning_aid_304_5)(learning_aid_304_e_none learning_aid_304_e_studportflio learning_aid_304_e_prestboards learning_aid_304_e_visualaids learning_aid_304_e_worksheets)

foreach var in learning_aid_304_e_none learning_aid_304_e_studportflio learning_aid_304_e_prestboards learning_aid_304_e_visualaids learning_aid_304_e_worksheets{
la val `var' yesnolbl
}

*bus_club_305 group_work_306 present_307 // these varibales were renamed with a suffix _e as they were added at endline questionnaire
rename (bus_club_305 group_work_306 present_307)(bus_club_305_e group_work_306_e present_307_e)

*yes_present_308 // this variable was added at endline and therefore renamed with a _e suffix
rename yes_present_308 yes_present_308_e

rename (yes_present_308_1 yes_present_308_2 yes_present_308_3 yes_present_308_4 yes_present_308_5)(yes_present_308_e_1studprest yes_present_308_e_manystudprest yes_present_308_e_teachresp yes_present_308_e_teachask yes_present_308_e_noneofabov)
foreach var in yes_present_308_e_1studprest yes_present_308_e_manystudprest yes_present_308_e_teachresp yes_present_308_e_teachask yes_present_308_e_noneofabov{
la val `var' yesnolbl
}

*class // renamed to match the baseline variable
rename class class_301


*******   GROUP TOPICS S4   ***********
*Baseline: groupdiscussion_302 grouptopics_302

*groupdiscussion_309 changed to groupdiscussion_302 as per the baseline names and labels//this variable question asks about S4
rename groupdiscussion_309 groupdiscussion_302
la var groupdiscussion_302 "302. Group Discussion"
la def groupdiscussion_302 1 "Yes" 0 "No"
la val groupdiscussion_302 groupdiscussion_302
notes replace groupdiscussion_302 in 1: "302. Group Discussion"

*grouptopics_310 //labelled as per the baseline
rename grouptopics_310_other grouptopics_302_spcify_other
rename grouptopics_310 grouptopics_302
foreach var in grouptopics_302_spcify_other grouptopics_302{
la var `var' "302. Did the Groupe Discussion cover any of the following topics (check all that apply)"
notes replace `var' in 1: "302. Did the Groupe Discussion cover any of the following topics (check all that apply)"
}

rename (grouptopics_310_1 grouptopics_310_2 grouptopics_310_3 grouptopics_310_4 grouptopics_310_5 grouptopics_310_6 grouptopics_310_7 grouptopics_310_8 grouptopics_310_9 grouptopics_310_10 grouptopics_310_11 grouptopics_310__66)(grouptopics_302_qualtentrp grouptopics_302_sltncomprobl grouptopics_302_workcomm grouptopics_302_emplyerval grouptopics_302_busilaw grouptopics_302_handpocktmon grouptopics_302_goalsett grouptopics_302_challngfund grouptopics_302_careergoal grouptopics_302_productsell grouptopics_302_actvtynothapen grouptopics_302_other)

foreach var in grouptopics_302_qualtentrp grouptopics_302_sltncomprobl grouptopics_302_workcomm grouptopics_302_emplyerval grouptopics_302_busilaw grouptopics_302_handpocktmon grouptopics_302_goalsett grouptopics_302_challngfund grouptopics_302_careergoal grouptopics_302_productsell grouptopics_302_actvtynothapen grouptopics_302_other{
la var `var' "302. Did the Groupe Discussion cover any of the following topics (check all that apply)"
notes replace `var' in 1: "302. Did the Groupe Discussion cover any of the following topics (check all that apply)"
la val `var' yesnolbl
}

*******   RESEARCH TOPICS S4   ***********
*@Baseline: research_303 researchtopics_303

*research_303 //this variable question asks abaout S4
rename research_311 research_303
la var research_303 "303. Research"
la def research_303 1 "Yes" 0 "No"
la val research_303 research_303
notes replace research_303 in 1: "303. Research"

*researchtopics_312 //labelled as per the baseline
rename researchtopics_312_other researchtopics_303_spcify_other
rename researchtopics_312 researchtopics_303
foreach var in researchtopics_303_spcify_other researchtopics_303{
la var `var' "303. Did the Research cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "303. Did the Research cover any of the following topics? (check all that apply)"
}  					

****
rename (researchtopics_312_1 researchtopics_312_2 researchtopics_312_3 researchtopics_312_4 researchtopics_312_5 researchtopics_312_6 researchtopics_312__66)(researchtopics_303_vistRDBweb researchtopics_303_standrd4bus researchtopics_303_vistRBSweb researchtopics_303_intervwbusmen researchtopics_303_financinstweb researchtopics_303_didnothapn researchtopics_303_other)

foreach var in researchtopics_303_vistRDBweb researchtopics_303_standrd4bus researchtopics_303_vistRBSweb researchtopics_303_intervwbusmen researchtopics_303_financinstweb researchtopics_303_didnothapn researchtopics_303_other{
la var `var' "303. Did the Research cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "303. Did the Research cover any of the following topics? (check all that apply)"
la val `var' yesnolbl
}


*******   CASESTUDY TOPICS S4   ***********
*@Baseline: casestudy_304 casestudytopics_304

*casestudy_304 //this variable question asks abaout S4
rename casestudy_313 casestudy_304
la var casestudy_304 "304. Case Study Discussion"
la def casestudy_304 1 "Yes" 0 "No"
la val casestudy_304 casestudy_304
notes replace casestudy_304 in 1: "304. Case Study Discussion"

*casestudytopics_304 //labelled as per the baseline
rename casestudytopics_314_other casestudytopics_304_spcify_other
rename casestudytopics_314 casestudytopics_304
foreach var in casestudytopics_304_spcify_other casestudytopics_304{
la var `var' "304. Did the Case Study Discussion cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "304. Did the Case Study Discussion cover any of the following topics? (check all that apply)"
}  					

****
rename (casestudytopics_314_1 casestudytopics_314_2 casestudytopics_314_3 casestudytopics_314_4 casestudytopics_314__66)(casestudytopics_314_selfpaid casestudytopics_314_startoperbus casestudytopics_314_transaccount casestudytopics_314_didnothapn casestudytopics_314_other)

foreach var in casestudytopics_314_selfpaid casestudytopics_314_startoperbus casestudytopics_314_transaccount casestudytopics_314_didnothapn casestudytopics_314_other{
la var `var' "304. Did the Case Study Discussion cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "304. Did the Case Study Discussion cover any of the following topics? (check all that apply)"
la val `var' yesnolbl
}



*******   ROLEPLAY TOPICS S4   ***********
*@Baseline: roleplay_305 roleplaytopics_305

*roleplay_315 changed to roleplay_305 per the baeline names/labels/notes//this variable question asks about S4
rename roleplay_315 roleplay_305
la var roleplay_305 "305. Role Play"
la def roleplay_305 1 "Yes" 0 "No"
la val roleplay_305 roleplay_305
notes replace roleplay_305 in 1: "305. Role Play"

*roleplaytopics_316 changed to roleplaytopics_305 as pe the baseline names/labels and notes//labelled as per the baseline
rename roleplaytopics_316_other roleplaytopics_305_spcify_other
rename roleplaytopics_316 roleplaytopics_305
foreach var in roleplaytopics_305_spcify_other roleplaytopics_305{
la var `var' "305. Did the Role Play cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "305. Did the Role Play cover any of the following topics? (check all that apply)"
}  					

****
rename (roleplaytopics_316_1 roleplaytopics_316_2 roleplaytopics_316_3 roleplaytopics_316_4 roleplaytopics_316_5 roleplaytopics_316_6 roleplaytopics_316__66)(roleplaytopics_305_poorprodct roleplaytopics_305_mrktstratg roleplaytopics_305_emplyselect roleplaytopics_305_cashvscredt roleplaytopics_305_creatprodct roleplaytopics_305_didnothapn roleplaytopics_305_other)

foreach var in roleplaytopics_305_poorprodct roleplaytopics_305_mrktstratg roleplaytopics_305_emplyselect roleplaytopics_305_cashvscredt roleplaytopics_305_creatprodct roleplaytopics_305_didnothapn roleplaytopics_305_other{
la var `var' "305. Did the Role Play cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "305. Did the Role Play cover any of the following topics? (check all that apply)"
la val `var' yesnolbl
}


*******   FINANCE TOPICS S4   ***********
*@Baseline: finance_306 financetopics_306

*finance_317 chnaged to finance_306 changed to roleplay_305 per the baeline names/labels/notes//this variable question asks about S4
rename finance_317 finance_306
la var finance_306 "306. Finance Practice"
la def finance_306 1 "Yes" 0 "No"
la val finance_306 finance_306
notes replace finance_306 in 1: "306. Finance Practice"

*financetopics_319 changed to changed to financetopics_306 as per the baseline names/labels and notes//labelled as per the baseline
rename financetopics_319_other financetopics_306_other_spcify
rename financetopics_318 financetopics_306
foreach var in financetopics_306_other_spcify financetopics_306{
la var `var' "306. Did the Finance Practice cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "306. Did the Finance Practice cover any of the following topics? (check all that apply)"
}  					

****
rename (financetopics_318_1 financetopics_318_2 financetopics_318_3 financetopics_318_4 financetopics_318_5 financetopics_318_6 financetopics_318__66)(financetopics_306_interstonbus financetopics_306_returnoninvest financetopics_306_loanform financetopics_306_paybackcrdt financetopics_306_writfinctrans financetopics_306_didnothapn financetopics_306_other)

foreach var in financetopics_306_interstonbus financetopics_306_returnoninvest financetopics_306_loanform financetopics_306_paybackcrdt financetopics_306_writfinctrans financetopics_306_didnothapn financetopics_306_other{
la var `var' "306. Did the Finance Practice cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "306. Did the Finance Practice cover any of the following topics? (check all that apply)"
la val `var' yesnolbl
}



******************************************************************************
*********************************  S5  ***************************************

*******   GROUP TOPICS S5   ***********
*Baseline: groupdiscussion_310 grouptopics_310
*Endline: groupdiscussion_320 grouptopics_320

*groupdiscussion_320 changed to groupdiscussion_310 as per the baseline names and labels//this variable question asks about S5
rename groupdiscussion_320 groupdiscussion_310
la var groupdiscussion_310 "310. Group Discussion"
la def groupdiscussion_310 1 "Yes" 0 "No"
la val groupdiscussion_310 groupdiscussion_310
notes replace groupdiscussion_310 in 1: "310. Group Discussion"

* groupdiscussion_320 chnaged to grouptopics_310  as per the baeline names/labels/notes //labelled as per the baseline
rename grouptopics_320_other grouptopics_310_other_spcify
rename grouptopics_320 grouptopics_310
foreach var in grouptopics_310_other_spcify grouptopics_310{
la var `var' "310. Did the Group Discussion cover any of the following topics (check all that apply)"
notes replace `var' in 1: "310. Did the Group Discussion cover any of the following topics (check all that apply)"
}

rename (grouptopics_320_1 grouptopics_320_2 grouptopics_320_3 grouptopics_320_4 grouptopics_320_5 grouptopics_320_6 grouptopics_320_7 grouptopics_320_8 grouptopics_320_9 grouptopics_320_10 grouptopics_320_11 grouptopics_320__66)(grouptopics_310_qualtentrp grouptopics_310_sltncomprobl grouptopics_310_workcomm grouptopics_310_emplyerval grouptopics_310_busilaw grouptopics_310_handpocktmon grouptopics_310_goalsett grouptopics_310_challngfund grouptopics_310_careergoal grouptopics_310_productsell grouptopics_310_actvtynothapen grouptopics_310_other)

foreach var in grouptopics_310_qualtentrp grouptopics_310_sltncomprobl grouptopics_310_workcomm grouptopics_310_emplyerval grouptopics_310 grouptopics_310_handpocktmon grouptopics_310_goalsett grouptopics_310_challngfund grouptopics_310_careergoal grouptopics_310_productsell grouptopics_310_actvtynothapen grouptopics_310_other{
la var `var' "310. Did the Group Discussion cover any of the following topics (check all that apply)"
notes replace `var' in 1: "310. Did the Group Discussion cover any of the following topics (check all that apply)"
destring `var', replace
la val `var' yesnolbl
}


*******   RESEARCH TOPICS S5   ***********
*@Endline : research_321 researchtopics_321
*@Baseline: research_311 researchtopics_311

*research_321 changed to research_311 to match it with the baseline names/labels and notes //this variable question asks abaout S5
rename research_321 research_311
la var research_311 "311. Research"
*la def research_311 1 "Yes" 0 "No"
la val research_311 research_311
notes replace research_311 in 1: "311. Research"

*researchtopics_312 changed to researchtopics_311 //labelled as per the baseline
*rename researchtopics_321_specify_other researchtopics_311_specify_oth
rename researchtopics_321 researchtopics_311

la var researchtopics_311 "311. Did the Research cover any of the following topics? (check all that apply)"
notes replace researchtopics_311 in 1: "311. Did the Research cover any of the following topics? (check all that apply)"
 					
drop researchtopics_321__66 // as there is another variable asking about other
****
rename (researchtopics_321_1 researchtopics_321_2 researchtopics_321_3 researchtopics_321_4 researchtopics_321_5 researchtopics_321_6 researchtopics_321_7 researchtopics_321_8 researchtopics_321_9 researchtopics_321_10 researchtopics_321_11 researchtopics_321_12 researchtopics_321_13 researchtopics_321_14 researchtopics_321_15 researchtopics_321_16 researchtopics_321_other)(researchtopics_311_meanofbusi researchtopics_311_intervresid researchtopics_311_contract researchtopics_311_defntax researchtopics_311_princptax researchtopics_311_taxinRda researchtopics_311_taxsystem researchtopics_311_primsecdata researchtopics_311_prdctmarkt researchtopics_311_fctbusgrowth researchtopics_311_useoftechn researchtopics_311_choosetechn researchtopics_311_ictools researchtopics_311_onlinbusi researchtopics_311_docbusi researchtopics_311_jobsandJD researchtopics_311_other)

foreach var in researchtopics_311_meanofbusi researchtopics_311_intervresid researchtopics_311_contract researchtopics_311_defntax researchtopics_311_princptax researchtopics_311_taxinRda researchtopics_311_taxsystem researchtopics_311_primsecdata researchtopics_311_prdctmarkt researchtopics_311_fctbusgrowth researchtopics_311_useoftechn researchtopics_311_choosetechn researchtopics_311_ictools researchtopics_311_onlinbusi researchtopics_311_docbusi researchtopics_311_jobsandJD researchtopics_311_other{
la var `var' "311. Did the Research cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "311. Did the Research cover any of the following topics? (check all that apply)"
la val `var' yesnolbl
}



*******   CASESTUDY TOPICS S5   ***********
*@Baseline: casestudy_312 casestudytopics_312
*Endline: casestudy_322 casestudytopics_323

*casestudy_322 changed to casestudy_312 to match baseline names/labels and notes //this variable question asks abaout S5
rename casestudy_322 casestudy_312
la var casestudy_312 "312. Case Study Discussion"
la def casestudy_312 1 "Yes" 0 "No"
la val casestudy_312 casestudy_312
notes replace casestudy_312 in 1: "312. Case Study Discussion"

*casestudytopics_323 changed to casestudytopics_312 //labelled as per the baseline
rename casestudytopics_323 casestudytopics_312
la var casestudytopics_312 "312. Did the Case Study Discussion cover any of the following topics? (check all that apply)"
notes replace casestudytopics_312 in 1: "312. Did the Case Study Discussion cover any of the following topics? (check all that apply)"

****
*droppped casestudytopics_323_other as it had no values
drop casestudytopics_323_other
rename (casestudytopics_323_1 casestudytopics_323_2 casestudytopics_323_3 casestudytopics_323_4 casestudytopics_323_5 casestudytopics_323_6 casestudytopics_323_7 casestudytopics_323_8 casestudytopics_323__66)(casestudytopics_312_sitofbus casestudytopics_312_typetax casestudytopics_312_resrchbus casestudytopics_312_growstrat casestudytopics_312_perf4bus casestudytopics_312_custcarserv casestudytopics_312_confassnt casestudytopics_312_didnothapn casestudytopics_312_other)

foreach var in casestudytopics_312_sitofbus casestudytopics_312_typetax casestudytopics_312_resrchbus casestudytopics_312_growstrat casestudytopics_312_perf4bus casestudytopics_312_custcarserv casestudytopics_312_confassnt casestudytopics_312_didnothapn casestudytopics_312_other{
la var `var' "312. Did the Case Study Discussion cover any of the following topics? (check all that apply)"
notes replace `var' in 1 : "312. Did the Case Study Discussion cover any of the following topics? (check all that apply)"
la val `var' yesnolbl
}


*******   ROLEPLAY TOPICS S5   ***********
*@Baseline: roleplay_313 roleplaytopics_313
*@endline: roleplay_324 roleplaytopics_324

*roleplay_324 changed to roleplay_305 per the baeline names/labels/notes//this variable question asks about S5
rename roleplay_324 roleplay_313
la var roleplay_313 "313. Role Play"
la def roleplay_313 1 "Yes" 0 "No"
la val roleplay_305 roleplay_313
notes replace roleplay_313 in 1: "313. Role Play"

*roleplaytopics_324 changed to roleplaytopics_313 as pe the baseline names/labels and notes//labelled as per the baseline
rename roleplaytopics_324 roleplaytopics_313
la var roleplaytopics_313 "313. Did the Role Play cover any of the following topics? (check all that apply)"
notes replace roleplaytopics_313 in 1: "313. Did the Role Play cover any of the following topics? (check all that apply)"
 					

****
rename (roleplaytopics_324_4 roleplaytopics_324_5 roleplaytopics_324_6 roleplaytopics_324_7 roleplaytopics_324_8 roleplaytopics_324_9 roleplaytopics_324__66 roleplaytopics_324_other)(roleplaytopics_313_roleofppl roleplaytopics_313_custmservc roleplaytopics_313_recruitproc roleplaytopics_313_docinbuysell roleplaytopics_313_creatprodct roleplaytopics_313_didnothappn roleplaytopics_313_other roleplaytopics_324_spcify_other)

foreach var in roleplaytopics_313_roleofppl roleplaytopics_313_custmservc roleplaytopics_313_recruitproc roleplaytopics_313_docinbuysell roleplaytopics_313_creatprodct roleplaytopics_313_didnothappn roleplaytopics_313_other roleplaytopics_324_spcify_other{
la var `var' "313. Did the Role Play cover any of the following topics? (check all that apply)"
notes replace `var' in 1: "313. Did the Role Play cover any of the following topics? (check all that apply)"
la val `var' yesnolbl
}


*******   FINANCE TOPICS S5   ***********
*@Baseline: finance_314 financetopics_314
*@Endline: finance_325 financetopics_325

*finance_325 chnaged to finance_314 changed to roleplay_305 per the baeline names/labels/notes//this variable question asks about S5
rename finance_325 finance_314
la var finance_314 "314. Finance Practice"
la def finance_314 1 "Yes" 0 "No"
la val finance_314 finance_314
notes replace finance_314 in 1: "314. Finance Practice"

*financetopics_325 changed to changed to financetopics_314 as per the baseline names/labels and notes//labelled as per the baseline
rename financetopics_325 financetopics_314
la var financetopics_314 "314. Did the Finance Practice cover any of the following topics? (check all that apply)"
notes replace financetopics_314 in 1: "314. Did the Finance Practice cover any of the following topics? (check all that apply)"
  					

****
rename (financetopics_325_1 financetopics_325_2 financetopics_325_3 financetopics_325_4 financetopics_325_5 financetopics_325_6 financetopics_325__66 financetopics_325_other)(financetopics_314_calctax financetopics_314_makbudget financetopics_314_acctbook financetopics_314_paybakcred financetopics_314_docfintrans financetopics_314_finpractc financetopics_314_other financetopics_314_spcify_other)

foreach var in financetopics_314_calctax financetopics_314_makbudget financetopics_314_acctbook financetopics_314_paybakcred financetopics_314_docfintrans financetopics_314_finpractc financetopics_314_other financetopics_314_spcify_other{
la var `var' "314. Did the Finance Practice cover any of the following topics?"
notes replace `var' in 1: "314. Did the Finance Practice cover any of the following topics? (check all that apply)"
la val `var' yesnolbl
}
drop financetopics_314_spcify_other
rename financetopics_325_specify_other financetopics_314_spcify_other


*****************************************************************
****************************** S6 *******************************

*grouptopics_326
rename (grouptopics_326_1 grouptopics_326_2 grouptopics_326_3 grouptopics_326_4 grouptopics_326_5 grouptopics_326_6 grouptopics_326_7 grouptopics_326_8 grouptopics_326_9)(grouptopics_326_SocioEcoDvpt grouptopics_326_EIAReport grouptopics_326_EIARolStakHold grouptopics_326_FinancMarkt grouptopics_326_OperBusRiskAssnt grouptopics_326_OperBusActPlan grouptopics_326_QualAssnCompl grouptopics_326_WorkHabtnBvior grouptopics_326_DidNotHappn)

*researchtopics_327 // dropped as it created a duplicte other
drop researchtopics_327__66 
rename (researchtopics_327_1 researchtopics_327_2 researchtopics_327_3 researchtopics_327_4 researchtopics_327_5)(researchtopics_327_SocioEcoActEf researchtopics_327_SocioEcoAct researchtopics_327_FinancMarkt researchtopics_327_StockContPrc researchtopics_327_DidNotHappn)

*casestudytopics_328
rename (casestudytopics_328_1 casestudytopics_328_2 casestudytopics_328_3 casestudytopics_328_4 casestudytopics_328_5 casestudytopics_328_6 casestudytopics_328_7)(casestudytopics_328_RolEntrpr casestudytopics_328_AnlyEIAReprt casestudytopics_328_FinStat casestudytopics_328_FinStatBShet casestudytopics_328_StockCont casestudytopics_328_QltyAsrComp casestudytopics_328_DidNotHappn)

*roleplaytopics_329
rename (roleplaytopics_329_4 roleplaytopics_329_5)(roleplaytopics_329_WorkHabit roleplaytopics_329_DidNotHappn)

*financetopics_330
rename (financetopics_330_1 financetopics_330_2 financetopics_330_3 financetopics_330_4 financetopics_330_5 financetopics_330_6)(financetopics_330_OperBusUnt9 financetopics_330_FinStatCashFlo financetopics_330_OperBusUnt8 financetopics_330_BusPlan financetopics_330_WorkHabCV financetopics_330_DidNotHappn)


/*

@Baseline
skilllabtable_500 "Is Skills Lab indicated on the timetable?"

@Endline:
skills_lab_call "Is this class scheduled to be a Skills Lab, according to the school timetable (from the earlier call)?"

*To be rechecked for renaming purposes
skills_lab_call 
skills_lab_class

*Section 2. CLASSROOM OBSERVATION SNAPSHOT
*******************************************


*Section 3. Lesson Observation 
******************************
*/
 

//Other cleaning codes as per Todd's email

// The classroom observation was administered to the S6 teacher who was not the baseline teacher since the latter was teaching in S5
replace uniqueid = "5040302" if uniqueid == "5040301" & key == "uuid:037fb2d1-6c63-4c3b-af8d-4035517c51f3"
replace reenter_teacherid = 5040302 if reenter_teacherid == 5040303 & key == "uuid:037fb2d1-6c63-4c3b-af8d-4035517c51f3"

//replaced to match the endline teacherid creation protocol
replace uniqueid = "3051351" if uniqueid == "3011352" & key == "uuid:cb541cdc-6d58-4e2e-a3a2-9640c5b6a96d"
replace reenter_teacherid = 3051351 if reenter_teacherid == 3011351 & key == "uuid:cb541cdc-6d58-4e2e-a3a2-9640c5b6a96d"

//replaced reenter_teacherid var to match the endline teacherid creation protocol
replace reenter_teacherid = 3050371 if reenter_teacherid == 305037 & key == "uuid:aa7a2a83-dcd4-4374-9bba-9580011db92c"

//replaced uniqueid var to match the endline teacherid creation protocol
replace uniqueid = "4021111" if uniqueid == "4021113" & key == "uuid:17b2c1d2-cd09-40dc-89ea-f8613d62e7a3"

//replaced reenter_teacherid var to match the endline teacherid creation protocol
replace uniqueid = "4030501" if uniqueid == "4030502" & key == "uuid:997dba9c-7eba-4f5b-9ebb-e89e685df605"

//replaced reenter_teacherid var to match the endline teacherid creation protocol
replace reenter_teacherid = 5071231 if reenter_teacherid == 50712331 & key == "uuid:f5a049c4-8640-4276-a1d9-fde9e4056c07"

//replaced reenter_teacherid var to match the endline teacherid creation protocol
replace reenter_teacherid = 5061181 if reenter_teacherid == 6051182 & key == "uuid:f2111918-2a4c-4c30-82d1-74a84a05783a"

//replaced reenter_teacherid var to match the endline teacherid creation protocol
replace reenter_teacherid = 5060322 if reenter_teacherid == 5060321 & key == "uuid:3f9067b1-b635-46df-a4e1-17effde2e6b9"

//replaced reenter_teacherid var to match the endline teacherid creation protocol
replace reenter_teacherid = 5031182 if reenter_teacherid == 5031184 & key == "uuid:dd5de47e-5ff1-4094-ba54-6bbf94d95e05"


//replaced uniqueid var to match the endline teacherid creation protocol
replace uniqueid = "5030561" if uniqueid == "5030562" & key == "uuid:242d8525-8a77-4198-b178-f4baf4c8a2a7"

//replaced reenter_teacherid var to match the endline teacherid creation protocol
replace reenter_teacherid = 4051112 if reenter_teacherid == 405112 & key == "uuid:6aa855e2-1771-477d-9ec2-46040bb59431"

//replaced uniqueid var to match the endline teacherid creation protocol
replace uniqueid = "4050352" if uniqueid == "4051022" & key == "uuid:3227a649-9381-4308-8656-d3497ff917c6" // to be rechecked if it's uniqueid or uniqueid

//replaced uniqueid and reenter_teacherid var to match the endline teacherid creation protocol
replace uniqueid = "3051353" if uniqueid == "3011352" & key == "uuid:cb541cdc-6d58-4e2e-a3a2-9640c5b6a96d"
replace reenter_teacherid = 3051353 if reenter_teacherid == 3011351 & key == "uuid:cb541cdc-6d58-4e2e-a3a2-9640c5b6a96d"

//replaced uniqueid and reenter_teacherid var to match the endline teacherid creation protocol
replace reenter_teacherid = 4020321 if reenter_teacherid == 402321 & key == "uuid:65944e80-ad28-4c68-be91-bb8df33b2048"


//replaced uniqueid and reenter_teacherid var to match the endline teacherid creation protocol
replace uniqueid = "5031042" if uniqueid == "5032042" & key == "uuid:0bd2180a-a66b-4c29-b455-abd5b19c334c"
replace reenter_teacherid = 5031042 if reenter_teacherid == 5032042 & key == "uuid:0bd2180a-a66b-4c29-b455-abd5b19c334c"

